package common;

import org.junit.*;

import common.dal.Transaction;
import common.interfaces.IPersistent;

@SuppressWarnings({"javadoc"})
public abstract class DBTest extends DALTests {
	private IPersistent	$;
	
	protected abstract IPersistent setPersistent(Transaction t);
	
	protected abstract IPersistent getPersistent();
	
	@Override
	@Before
	public void setup() throws Exception {
		super.setup();
		$ = setPersistent(t);
		$.clear();
	}
	
	@Override
	@After
	public void tearDown() throws Exception {
		getPersistent().clear();
		super.tearDown();
	}
}
